package com.iakuil.app.domain.dto.cmd;


import com.iakuil.app.common.core.enums.Gender;
import com.iakuil.app.common.core.jsr303.constraints.In;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 作者 创建参数
 *
 * @author Kai
 * @date 2023-12-05
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class AuthorAdd implements Serializable {

    @Schema(description = "姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max = 50, message = "作者姓名长度不能超过{max}")
    private String name;

    @Schema(description = "性别")
    @In(range = {0, 1, 2})
    private Gender gender;

    @Schema(description = "简介")
    @Size(max = 2000, message = "作者简介长度不能超过{max}")
    private String profile;
}
